package com.bawei.model_sevent.Activity.Adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;

import com.bawei.model_sevent.Activity.Bean.OrderBean;
import com.bawei.model_sevent.R;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * 时间：2021/11/25 18:58.
 * 类名：OrderAdapter
 * 作用：Model_sevent
 * 作者:张羽_zy
 */
public class OrderAdapter extends BaseQuickAdapter<OrderBean, BaseViewHolder> {


    public OrderAdapter( @Nullable List<OrderBean> data) {
        super(R.layout.order_item, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, OrderBean orderBean) {
        baseViewHolder.setText(R.id.fruit_name,orderBean.getName());
        Glide.with(getContext()).load(orderBean.getImage()).into((ImageView) baseViewHolder.getView(R.id.fruit_image));
    }
}
